package rush.rushcampus.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import rush.rushcampus.common.Result;
import rush.rushcampus.vo.ArticleInfoVo;
import rush.rushcampus.vo.ArticleVo;
import rush.rushcampus.entity.Article;
import com.baomidou.mybatisplus.extension.service.IService;
import rush.rushcampus.dto.ArticleDto;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author rush
 * @since 2024-06-11
 */
public interface IArticleService extends IService<Article> {

    List<ArticleVo> convertToDto(List<Article> records);

    void addArticle(ArticleDto articleDto);

    Result updateArticle(ArticleDto articleDto);

    void removeArticle(Long id, Integer commentType);

    Page<ArticleVo> pageList(int page, int pageSize, String title, Integer status ,String star);

    ArticleInfoVo getArticleById(Long id);
}
